home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Creative Computers
/
Creative Computers CD-ROM, Volume 1 (Legendary Design Technologies, Inc.)(1994).iso
/
shareware
/
fractals
/
fractallab
/
fractal lab.docs
< prev
next >
Wrap
Text File
|
1994-11-17
|
13KB
|
266 lines
//////// Fractal Lab 1.0, ©1990 by Terry W. Gintz ///////
The science of Fractals was formally introduced by Benoit Mendelbrot in his
"preface" The Fractal Geometry of Nature. While being very descriptive of
various recursive fractal curves, such as the Koch and Peano curves, this
book says very little on the art of generating such curves with a computer.
Fractal Lab was written to enable a generalized creation of what Mandelbrot
terms self-similiar and self-contacting/non-contacting recursive curves.
Most of these basic curves appearing in The Fractal Geometry of Nature can
be produced using Fractal Lab. And these can be done in color, up to 8
colors. Mandelbrot illustrated these only in black, white and gray scale.
No attempt is made to draw the Mandelbrot set or other complex-number sets.
Fractal landscapes are also outside the scope of this program.
Mandelbrot uses the terms "generator" and "initiator" to describe the basic
building blocks of self-similiar curves. The generator describes the way a
curve is broken down into smaller images of itself. The initiator describes
how the generator is used. The generator for a koch curve would resemble a
line split into three sections, the middle section being replaced with the
upper two legs of a equilateral triangle. The initiator would be a triangle
to form a "koch island". There are various rules for randomizing the
generator and placement of the generator. These will be explained in the
menu command descriptions.
Fractal Lab does more than emulate parts of The Fractal Geometry of Nature,
because it allows one to generate other curves not shown there, and possibly
unimagined ones too. A sample of the curves possible is included on the
program disk. At the higher levels of recursion, some of these curves take
on three-dimensional qualities like molecular models, etc.
This program uses a hi-res/interlace screen with overscan for all drawing and
editing. The screen is 672 by 432. You may need to adjust both your
monitor and run a program like More Rows to view all of it. Lower
resolutions do not produce the desired quality of display for this type of
graphics. Overscan adds to the resolution and quality.
Flicker does appear to be bothersome at times, especially with system
requesters. There are used sparingly. The high use of chip memory in the
main drawing screen made swapping custom screens for editing undesirable.
Topaz 60 was selected for menu and editing fonts to improve readability in
the interlace mode. No attempt was made to customize the color palette to
reduce flicker. Certainly, a palette-change program could be used as a
background process, to do this. Fractal Lab should multi-task without
problems. When in a wait state, the program uses Wait() or Delay() to enable
other tasks to run at full speed. While drawing, there is no Wait or Delay
for maximum drawing speed. You may need to set the priortity for Fractal
Lab lower while drawing to let other tasks run at normal speed.
About the Menus:
The Project Menu:
"New" erases the current generator and initiator. A koch fractal is loaded
and displayed if no command arguments are used in invoking Fractal Lab.
"Clear" clears the screen and sets the background color to what is selected
on the Background Menu (1 of 8 colors).
"Draw" invokes the level window, then draws the current fractal at the
specified level of recursion. Does not clear the screen before drawing or
change the background color. Click the left-mouse button to stop a drawing
in progress.
"Move" changes the cursor to a green plus to locate the fractal's starting
point anywhere on the screen, overriding the setting of the initiator.
Click where you want the fractal to start drawing. Useful for tiling
multiple fractals on the screen, or putting different fractals side by side.
Does not clear the screen before drawing, nor change the random factor when
the RANDOMSIDES flag is set. This enables random dragons to be moved.
"Save" saves the current settings on the Flags and Background menus, and the
data for the generator and initiator segments. Also creates a custom icon
for each fractal file that can invoke Fractal Lab from the workbench and
draw itself. The current level is also saved. You can save a fractal with
only a generator or only an initiator, but it won't get drawn
the next time it is loaded.
"Load" loads a fractal file previously saved by Fractal Lab and draws the
fractal like "Draw" without clearing the screen or changing the background
color, and using the saved level of recursion.
"Quit" exits the program.
The Edit menu:
"Generator" invokes the Edit Generator window explained below.
"Initiator" invokes the Edit Initiator window explained below.
"Scale" invokes the Scale Initiator window explained below.
The Flags Menu:
These items define some rules for placing the generator while drawing.
ALTERNATE tells the generate routine to reverse the side placement of the
generator at each stage of recursion. Must be set to draw snowflakes, etc.
ALTERNATE excludes the RANDOMSIDES and ALTFIRSTPOS flags and enables the
RANDOMREVERSE flag to be set or not.
RANDOMSIDES randomizes the side the generator is placed on at the first stage
of each level of recursion after the first recursion. Must be set to draw
random dragons. Excludes ALTERNATE, ALTFIRSTPOS and disables the
RANDOMREVERSE item.
RANDOMREVERSE reverses the generator without changing the side it is to be
draw on. Used to create random snowflakes, etc.
ALTFIRSTPOS alternates the generator every other level starting with the
lowest level. Excludes ALTERNATE and RANDOMSIDES. Used for the Polya
fractal.
REVRIGHTSIDE reverses the generator when it is drawn on the right side.
Used for the Peano-Gosper fractal and Quartet fractal. Can be used with any
of the other flags, for different effects.
NO FLAGS excludes all other flags and disables RANDOMREVERSE. Use
to display the original dragon curve, or to eliminate the random factor from
any curve that doesn't use ALTERNATE or RANDOMSIDES.
The Background menu:
One of eight items selects the background color that will be displayed
the next time the screen is cleared with Clear. Selection is also saved
with the Save option.
About the windows:
The main window is used for drawing and all other windows/requesters appear
on top of it. It contains depth-adjust gadgets at the top right, though
these are covered up after the first drawing is displayed. Use the depth
adjusters to move the edit windows out of sight if you need to refer to the
drawing details, then to move the edit windows back.
The Edit Generator window allows you to add and edit up to 30 segments for
the fractal generator. The top row of gadgets are the control gadgets and
the lower gadgets are for entering data. There are error messages that
appear between these sets of gadgets to help the user with input.
The Control gadgets:
The # gadget is used to enter a number within the range of existing segments
to insert or recall a segment for changing or deleting. You can also insert
what you recall or add it back too.
The Add gadget adds a segment to the end of the list of generator
segments. You must first enter a valid segment into the data gadgets.
The Change and Delete Gadgets are enabled after using the Recall gadget, to
edit or delete a previously added or inserted segment.
The Insert gadget works with the # gadget to add a segment in front of the
previously added segment.
The Recall gadget enters a previously-added segment into the data gadgets,
to enable editing or deleting it. This prevents erasing or changing a
segment, with the wrong number in the # gadget.
The Cancel gadget cancels a recall operation and re-enables the # and Recall
gadgets.
The Data gadgets:
The Relative Direction gadget defines the direction of the segment relative
to the 90 degree position, (0 is straight up), or full right.
The relative direction ranges from -180 to 180 (degrees).
The Relative Length gadget defines the length of the segment as a
fraction of the total length of the initiator segment length. This ranges
from -1.0 to 1.0. Enter a negative leng